<?php

/**
 * Controller for the front page.
 *
 * @author    Mon Zafra <monzee at gmail>
 * @copyright (c)2009 Mon Zafra
 * @category  Mz
 * @package   demo
 * @license   http://mz-project.googlecode.com/svn/trunk/LICENSE    MIT License
 * @version   SVN: $Id: IndexController.php 8 2009-02-20 12:26:29Z monzee $
 */
class IndexController extends Zend_Controller_Action
{
    public function indexAction()
    {
        if ($this->_helper->module('chat')) {
            if ($this->_hasParam('chatEntryForm')) {
                $form = $this->_getParam('chatEntryForm');
                $this->_setParam('chatEntryForm', null);
            } else {
                $form = new Chat_EntryForm(array(
                    'action' => $this->_helper->url('post', 'index', 'chat')
                ));
            }

            $this->view->chatForm = $form;
        }
    }

}
